#include <iostream>
#include <set>
using namespace std;

int main()
{
    set<int, std::greater<int>> s = {1,2,4,5,6};
    while(!s.empty())
    {
        std::cout << *s.begin() << " ";
        s.erase(s.begin());
    }
    return 0;
}